package www.sofn.com.order.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@Schema(description = "创建订单")
public class CreateGoodsOrderVo {
    @Schema(description = "商品Id")
    @NotBlank(message = "商品Id不能为空")
    private String goodsId;
    @Schema(description = "商品规格Id")
    @NotBlank(message = "商品规格Id不能为空")
    private String goodsAttrId;
    @Schema(description = "收货地址Id")
    @NotBlank(message = "收货地址不能为空")
    private String addressId;
    @Schema(description = "商品数量")
    @Min(value = 1,message = "购买数量不能小于1")
    @Max(value = 100, message = "最大购买数量不能大于{max}")
    private Integer goodsNum;
}
